home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / sheriffa / slsapiex.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-07-04  |  1.9 KB  |  63 lines

  1. #ifndef SLSAPIEX_H
  2. #define SLSAPIEX_H
  3.  
  4. #include "lictype.h"
  5.  
  6. #ifdef __cplusplus 
  7. extern "C"
  8. {
  9. #endif
  10.  
  11. //return code from SLS_GenerateKey
  12. #define SLSKEY_ERROR                0
  13. #define SLSKEY_SUCCESS                1
  14. #define SLSKEY_E_BAD_PRODUCT_ID        2
  15. #define SLSKEY_E_BAD_REFERENCE        3
  16. #define SLSKEY_E_BAD_PID_REF        4    //Reference code does not match product ID
  17. #define SLSKEY_E_BAD_LICENCE_TYPE    5
  18. #define SLSKEY_E_BAD_LICENCE_DATE    6
  19. #define SLSKEY_E_BAD_SECRET_SIZE    10
  20. #define SLSKEY_E_BAD_SECRET_1        11
  21. #define SLSKEY_E_BAD_SECRET_2        12
  22. #define SLSKEY_E_BAD_SECRET_3        13
  23. #define SLSKEY_E_BAD_SECRET_4        14
  24.  
  25.  
  26. int WINAPI SLS_GenerateLicenceKey(
  27.             LPCSTR        lpszProductID,        //null terminated string
  28.             SLS_SECRET    *ppSecretArray,        //array of secrect codes
  29.             int            nSecretSize,        //should always be 4
  30.             LPCSTR        lpszReferenceCode,    //null terminated string
  31.             SLS_LICENCE *pLicencePolicy,    //licence policy
  32.             LPSTR        lpszLicenceKey);    //point to address to receive licence key, allow 64 bytes. Will be null terminated
  33.  
  34. //return SLSKEY_ERROR(0) if failed
  35. //return SLSKEY_SUCCESS(1) if succeeded
  36. int WINAPI SLS_VerifyTerminationCode(
  37.             const char *pszUPID,
  38.             const char *pszLicenceKey,
  39.             SLS_LICENCE *plicInfo);
  40.  
  41. //return SLSKEY_ERROR(0) if failed
  42. //return SLSKEY_SUCCESS(1) if succeeded
  43. int WINAPI SLS_VerifyStatusCode(
  44.             const char *pszUPID,
  45.             const char *pszLicenceKey,
  46.             SLS_LICENCE *plicInfo);
  47.  
  48. //return SLSKEY_ERROR(0) if failed
  49. //return SLSKEY_SUCCESS(1) if succeeded
  50. int WINAPI SLS_GenerateRemovePassword(
  51.             LPCSTR        lpszProductID,        //null terminated string
  52.             SLS_SECRET    *ppSecretArray,        //array of secrect codes
  53.             int            nSecretSize,        //should always be 4
  54.             LPCSTR        lpszRemoveReference,//null terminated string
  55.             LPSTR        lpszRemovePassword);//point to address to receive remove password, allow 64 bytes. Will be null terminated
  56.  
  57.  
  58. #ifdef __cplusplus  
  59. }
  60. #endif
  61.  
  62. #endif
  63.